import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("user")
export class UserEntity {
  @PrimaryGeneratedColumn({ name: "id", type: "int", comment: "用户id" })
  id: number;

  @Column({ name: "a_id", type: "int", comment: "账户id" })
  aId: number;

  @Column({ name: "nickname", type: "varchar",length:10, comment: "昵称/用户名" })
  nickname: string;

  @Column({ name: "status", type: "int", comment: "用户状态:1-在线,2-离线,3-封禁,4-注销" })
  status: number;

  @Column({ name: "create_time", type: "datetime", comment: "创建时间" })
  createTime: string;

  @Column({ name: "login_time", type: "datetime", comment: "上次登录时间", nullable: true })
  loginTime: string;

  @Column({ name: "type", type: "varchar", comment: "用户类型:1-domestic" })
  type: "domestic";

  @Column({ name: "signature", type: "varchar", comment: "个性签名", nullable: true })
  signature: string;

  @Column({ name: "avatar", type: "varchar", comment: "头像", nullable: true })
  avatar: string;
}